
using SqlSugar;
using System;
using System.ComponentModel.DataAnnotations;
using System.Reflection.Emit;

namespace Domain
{
    /// <summary>
    /// 物料请购单主表
    /// </summary>
    [SugarTable("Lwp_MaterialRequisition")]
    public class Lwp_MaterialRequisition
    {
        [Key]
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        
        /// <summary>
        /// 单据编码
        /// </summary>
        public string BillCode { get; set; } = string.Empty;
        
        /// <summary>
        /// 业务类型
        /// </summary>
        public string BizType { get; set; } = string.Empty;
        
        /// <summary>
        /// 用料需求
        /// </summary>
        public string MaterialRequirement { get; set; } = string.Empty;
        
        /// <summary>
        /// 计划单号
        /// </summary>
        public string PlanNumber { get; set; } = string.Empty;
        
        /// <summary>
        /// 单据日期
        /// </summary>
        public DateTime BillDate { get; set; }
        
        /// <summary>
        /// 操作员
        /// </summary>
        public string Operator { get; set; } = string.Empty;
        
        /// <summary>
        /// 业务部门
        /// </summary>
        public string Department { get; set; } = string.Empty;
        
        /// <summary>
        /// 销售单号
        /// </summary>
        public string SalesNumber { get; set; } = string.Empty;
        
        /// <summary>
        /// 单据状态
        /// </summary>
        public string Status { get; set; } = string.Empty;
        
        /// <summary>
        /// 审核员
        /// </summary>
        public string Auditor { get; set; } = string.Empty;

        /// <summary>
        /// 业务人员
        /// </summary>
        public string SalesPerson { get; set; } = string.Empty;

        /// <summary>
        /// 销售员
        /// </summary>
        public string Salesman { get; set; } = string.Empty;
        
        /// <summary>
        /// 数量
        /// </summary>
        public int TotalQty { get; set; }
        
        /// <summary>
        /// 审核日期
        /// </summary>
        public DateTime? AuditDate { get; set; }
        
        /// <summary>
        /// 备注信息
        /// </summary>
        public string? Remark { get; set; }
        
        /// <summary>
        /// 订单交期
        /// </summary>
        public DateTime DeliveryDate { get; set; }
        /// <summary>
        /// 导航属性
        /// </summary>
        [Navigate(NavigateType.OneToMany, nameof(Lwp_MaterialRequisitionmx.MaterialRequisitionId), nameof(Id))]
        public List<Lwp_MaterialRequisitionmx> MaterialRequisitionmxs { get; set; }
    }
}
